<?php include_once("../../../common/common_setting_unit.php");         // 引入通用的设置文件 ?>
<?php include_once(ROOT_PATH_ . "/controller/common/module/head.php"); // 引入通用的头部 ?>
<?php include_once("../controller/data_list.php");   ?>


<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/script/site-function.php"); ?>


<body>

<!--顶部栏-->
<div id="topbar"> <?php include ROOT_PATH_ . '/controller/common/module/topbar.php'; ?></div>

<!--容器-->
<div id="container" class="<? echo $now_extender ?>">

    <!--侧边栏-->
    <div id="sidebar"><?php include ROOT_PATH_ . '/controller/common/module/sidebar.php'; ?></div>





    <?
    //==============================================================================
    //这里开始才是平常开发需要注重的部分，其余的基本不用理会
    //==============================================================================
    ?>


    <div id="content" class="layui-form">

        <!--标题设定-->
        <?php $page_title= '友情链接';?>
        <?php include ROOT_PATH_ . '/controller/common/module/mod-page-title.php'; ?>

			<div class="statistic">
                <?php include_once("../modules/detail_btn.php");?>
                <hr />
            </div>
            
            <div class="list-box">

                <div class="list-boxes">
					<table class="layui-table layui-form">
                        <colgroup>
                            <col width="20">
                            <col>
                            <col>
                            <col width="100">
                            <col width="220">
                        </colgroup>
                        <thead>
                        <tr>
                            <th class="ordernumber">编号</th>
                            <th class="content-box">名字</th>
                            <th class="content-box">链接</th>
                            <th>发布</th>
                            <th  class="function">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        	<?php for ($i = 0; $i < $detailnum; $i++) { ?>
                                <tr id="item<?echo $detail_nid[$i]?>">
                                <td >
                                    <input type="checkbox" name="nid[]"
                                           value="<?echo $detail_nid[$i]?>"
                                           lay-skin="primary"
                                           lay-filter="nid-filter"
                                    >
                                </td>
                                    <td><?php echo $detail_name[$i] ?></td>
                                    <td><?echo $detail_link[$i]?></td>
                                <td>
                                    <li >
                                        <input type="checkbox" name="publish" value="<?php echo $detail_publish[$i];?>"
                                               lay-skin="switch" lay-filter="filter"
                                               id="<?php echo $detail_nid[$i];?>"
                                               lay-text="发布|隐藏" <?if ($detail_publish[$i] == 1) { echo "checked"; }?> >
                                    </li>
                                </td>
                                <td class="function">
                                	<a class="delete layui-btn  layui-btn-sm" href="javascript:void(0)"
                                       onclick="deleter(<?php echo $detail_nid[$i] ?>,'data_delete_process')"><i class="layui-icon">&#xe640;</i>删除</a>


                                    <a class="delete layui-btn  layui-btn-sm" href="detail-edit.php?nid=<?php echo $detail_nid[$i] ?>&now_extender=<? echo $system_part ?>"><i class="layui-icon">&#xe642;</i>修改</a>
                                </td>
                            </tr>
                              <?php } ?>
                    	</tbody>
                    </table>
                </div>

                <?php include 'module/page_numbers.php'; ?>




                <!--list-box end-->
            </div>

            <!--content端點01-->
        </div>
        <!--maincontent端點01-->
        <br class="clearfloat"/>
    </div>
    <!--container端點01-->
</div>

<!--载入删除功能-->
<script type="text/javascript" src="/controller/common/asset/js/deleter.js"></script>
<script type="text/javascript" src="../asset/js/publish_switch.js"></script>

<!--底部栏-->

<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>


</body>
</html>
